#ifndef PERFORMANCE_TEST_H
#define PERFORMANCE_TEST_H

#include "../WrappedContainers/LinkedList.h"
#include "../SurfaceRenderingData.h"

class PerformanceTest {
protected:
	LinkedList<const char*> sectionNames;
	LinkedList<LinkedList<int> > sectionTimes;
	int lastTime;
	int currentIteration;
	bool enabled;
	SurfaceRenderingData bg;
	SurfaceRenderingData textColor;
	const static int colorsCount = 7;
	SurfaceRenderingData colors[colorsCount];
	int recordLimit;

public:
	PerformanceTest();

	void SetEnabled(bool enabled);

	inline bool IsEnabled() {
		return enabled;
	}

	void Start();
	void Next(const char* sectionName);
	void PrintToFile();
	void RenderLastValues();
	void Reset();

	static void ReshapeCallback(int width, int height);
};

#endif //PERFORMANCE_TEST_H
